<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="utf-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Insert title here</title>
<link rel="stylesheet" href="//apps.bdimg.com/libs/bootstrap/3.3.4/css/bootstrap.min.css">
</head>
<body>
<div ng-app="myApp" ng-controller="myCtrl"  ng-init="mySwitch=true"> 

<p>获取后台数据</p>
<table class="table table-striped">
 <tr>
	<td>序号</td>
	<td>name</td>
	<td>desca</td>
	<td>Edit</td>
	
</tr>
<tr ng-repeat="x    in names">
  <td>{{ $index + 1 }}</td>
  <td>{{x.name}}</td>
  <td>{{x.desca}}</td>
  <td><button class="btn">
      <span class="glyphicon glyphicon-pencil"></span>&nbsp;&nbsp;编辑
      </button></td>
</tr>
</table>
<hr>
<ul>
  <li ng-repeat="x    in names">
    {{ x.name + ', ' + x.id }}
  </li>
</ul>

  <select  id="select1" ng-init="selectedName = namesa[0]" ng-change="look();"  ng-model="selectedName" ng-options="x for x in namesa">
      <option value="">所有人</option> <!-- 不加这句代码，会出现空白 -->
  </select>

<select id="select2">
<option   ng-repeat="x in namesa">{{x}}</option>
</select>
<hr/>
<input type="checkbox" ng-model="mySwitch"/>按钮
<button ng-disabled="false">点我!</button>
</div>
	<script src="http://cdn.static.runoob.com/libs/jquery/1.10.2/jquery.min.js"></script>
	<script src="http://cdn.static.runoob.com/libs/angular.js/1.4.6/angular.min.js"></script>
	<script type="text/javascript" src="js/first.js"></script>
	
</body>
</html>